<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="外协项目" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script language="javascript">
	function doJump(pageIndex){
		if(window.event.keyCode==13){
			doGo(pageIndex);
		}
	}
	function doGo(pageIndex){
		window.location="/cooper/CooperBillItemListForEstablishment.ihtm?id=${id}&current_page="+pageIndex;
	}
</script>
</head>
<body oncontextmenu="return false" class="sheet" style="text-align:center;">
<div class="sheet-main" style="width:860px;text-align:left;margin:auto;">
	<div class="sheet-top">
		<div class="content">
		  <h2>外协项目</h2>
		  <p>外协商名称：${est.estName}</p>
		</div>
	</div>
	  <div class="sheet-list">
		  <div class="cue-info">
			<span>金额汇总（未扣除优惠款）：${costTotal}元</span>
	      </div>
			  <div class="table-list">
			     <table width="100%" align="center">      
	 					<tr>	
							<th width="10%">外协日期</th>
							<th width="10%">项目类型</th>
							<th width="14%">内容</th>
							<th width="14%">规格</th>
							<th width="18%">制作要求</th>
							<th width="8%">单位</th>
							<th width="8%">数量</th>
							<th width="8%">单价</th>
							<th width="10%">金额(元)</th>
						</tr>
						<c:forEach var="item" items="${qr.list}">
						<tr>
							<td><fmt:formatDate value="${item[0].cooperDate}" pattern="yyyy-MM-dd"/></td>
							<td>${item[1].makeTypeName}</td>
							<td><commonTag:parseEnterToBr source="${item[1].cooperBillItem.finishedContent}" /></td>
							<td>
								<commonTag:parseEnterToBr source="${item[1].cooperBillItem.specification}" />
								<c:if test="${item[1].cooperBillItem.priceType=='AREA' || item[1].cooperBillItem.priceType=='LENGTH'}"> x <commonTag:parseBigDecimal source="${item[1].cooperBillItem.amount}" /></c:if>
							</td>
							<td><commonTag:parseEnterToBr source="${item[1].cooperBillItem.makeRequire}" /></td>
							<td>
								<c:if test="${item[1].cooperBillItem.priceType=='AREA'}">平方米</c:if>
								<c:if test="${item[1].cooperBillItem.priceType=='LENGTH'}">
									<c:if test="${item[1].cooperBillItem.lengType=='M'}">米</c:if><c:if test="${item[1].cooperBillItem.lengType=='CM'}">公分</c:if>
								</c:if>
								<c:if test="${item[1].cooperBillItem.priceType=='AMOUNT'}">${item[1].cooperBillItem.unit}</c:if>
							</td>
							<td>
								<c:if test="${item[1].cooperBillItem.priceType=='AREA' || item[1].cooperBillItem.priceType=='LENGTH'}"><commonTag:parseBigDecimal source="${item[1].cooperBillItem.squareNum}" /></c:if>
								<c:if test="${item[1].cooperBillItem.priceType=='AMOUNT'}"><commonTag:parseBigDecimal source="${item[1].cooperBillItem.amount}" /></c:if>
							</td>
							<td><commonTag:parseBigDecimal source="${item[1].cooperBillItem.unitPrice}" /></td>
							<td><commonTag:parseBigDecimal source="${item[1].cooperBillItem.cost}" /></td>
						</tr>
						</c:forEach>
				   </table>
				   <%@include file="../inc/Pages.jsp"%>
			  </div>
			</div>
</div>
</body>
</html>